home *** CD-ROM | disk | FTP | other *** search
/ Internet Publisher's Toolbox 2.0 / Internet Publisher's Toolbox.iso / internet / ntserver / wtsource / cdialect.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-16  |  2.8 KB  |  133 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE:
  2.    No guarentees or restrictions.  See the readme file for the full standard
  3.    disclaimer.
  4.  
  5.    5.29.90  Harry Morris, morris@think.com
  6. */
  7.  
  8. /* Copyright (c) CNIDR (see ../COPYRIGHT) */
  9.  
  10.  
  11. /* there are three kinds of C that we have encountered so far:
  12.  
  13.         1. ANSI_LIKE    - full prototypes and stdargs and ansi includes
  14.         2. PROTO_ANSI   - full prototypes, varargs and misc includes
  15.         3. K_AND_R  - k&r prototypes, varargs and misc includes
  16.         
  17.   This file is a mess because some compilers do not handle elif.  sorry.
  18.  
  19.   defined symbols for other machines:
  20.     hp:         hpux
  21.     Next:       NeXT 
  22. */
  23.  
  24. #ifndef C_DIALECT
  25. #define C_DIALECT
  26.  
  27. /*----------------------------------------------------------------------*/
  28.  
  29. #ifdef STDC
  30. #define ANSI_LIKE
  31. #endif /* def STDC */
  32.  
  33. #ifdef __STDC__
  34. #ifndef M_XENIX /* for some reason XENIX defines __STDC__ */
  35.  
  36. #ifndef __HIGHC__
  37. #define ANSI_LIKE
  38. #endif /* ndef __HIGHC__ */
  39. #endif /* ndef M_XENIX */
  40. #endif /* __STDC__ */
  41.  
  42. #ifdef THINK_C
  43. #define ANSI_LIKE
  44. #endif /* THINK_C */
  45.  
  46. #ifdef MPW          
  47. #define ANSI_LIKE
  48. #endif /* MPW */
  49.  
  50. #ifdef VAX_C            /* vms */
  51. #define ANSI_LIKE
  52. #endif /* VAX_C */
  53.  
  54. #ifdef MSC          /* XXX not sure if this is correct */
  55. #define ANSI_LIKE
  56. #endif /* MSC */
  57.  
  58. #ifdef WIN32
  59. #define ANSI_LIKE
  60. #endif
  61.  
  62. #ifndef ANSI_LIKE
  63.  
  64. #ifdef SABER            /* c interpreter/debugger */
  65. #define PROTO_ANSI
  66. #endif /* SABER */
  67.  
  68. #ifdef cstar            /* parallel C on the CM */
  69. #define PROTO_ANSI
  70. #endif /* cstar */
  71.  
  72. #ifndef PROTO_ANSI
  73.  
  74. #ifdef SUN_C            /* XXX not sure if this is correct */
  75. #define K_AND_R
  76. #endif /* SUN_C */
  77.  
  78. #ifdef __GNUC__         /* gcc in traditional mode */
  79. #define K_AND_R         /* gcc in ansi mode defines __STDC__ */
  80. #endif /* __GNUC__ */
  81.  
  82. #ifdef M_XENIX
  83. #define K_AND_R
  84. #define NOTCPIP /* doesn't support TCP */
  85. #define SYSV /* is based on system V */
  86. #endif /* M_XENIX */
  87.  
  88. /* otherwise */
  89. #define K_AND_R         /* default to the stone age */
  90.  
  91. #endif /* ndef PROTO_ANSI */
  92. #endif /* ndef ANSI_LIKE */
  93.  
  94. /* set up the function prototyping convention */
  95.  
  96. #ifdef ANSI_LIKE
  97. #define _AP(args) args
  98. #endif /* def ANSI_LIKE */
  99.  
  100. #ifdef PROTO_ANSI
  101. #define _AP(args) args
  102. #endif /* def PROTO_ANSI */
  103.  
  104. #ifdef K_AND_R
  105. #define _AP(args) ()
  106. #endif /* def K_AND_R */
  107.  
  108. /* if you are not k_and_r, then load in ustubs always */
  109. #ifdef K_AND_R
  110. #include "ustubs.h"
  111. #endif /* def K_AND_R */
  112.  
  113. /* Comment this back in to figure out what the compiler thinks we are */
  114. /*
  115. #ifdef ANSI_LIKE
  116. WeareAnsiLike
  117. #endif
  118. #ifdef PROTO_ANSI
  119. WeareProtoAnsi
  120. #endif
  121. #ifdef K_AND_R
  122. WeareKandR
  123. #endif
  124. Crash-and-Burn
  125. */
  126. /* End of chunk to comment back in */
  127.  
  128. #endif /* ndef C_DIALECT */
  129.  
  130. /*----------------------------------------------------------------------*/
  131.  
  132.  
  133.